package com.ygqh.baby.model;

import com.ygqh.baby.ao.ProductStatus;
import com.ygqh.baby.ao.SendType;
import com.ygqh.baby.utils.DateConvertUtils;

import java.math.BigDecimal;
import java.util.Date;

public class StockModel extends YgStockModel {

	private Long productId;
	private String productName;
	private String adminProductName;
	private String productImg;
	private String categoryName;
	private String groupName;
	private ProductStatus saleStatus;
	private String size;
	private BigDecimal costPrice;
	private BigDecimal productSalePrice;
	private BigDecimal vipPrice;
	private Date createTime;
	private Boolean isSync;
	private String barCode;
	private String shortName;
	private String saleStatusDesc;
	private String isSyncDesc;
	private SendType sendType;
	private String salesPlatform;
	
	public String getBarCode() {
		return barCode;
	}

	public void setBarCode(String barCode) {
		this.barCode = barCode;
	}

	public BigDecimal getVipPrice() {
		return vipPrice;
	}

	public void setVipPrice(BigDecimal vipPrice) {
		this.vipPrice = vipPrice;
	}

	public Boolean getIsSync() {
		return isSync;
	}

	public void setIsSync(Boolean isSync) {
		this.isSync = isSync;
	}

	public BigDecimal getProductSalePrice() {
		return productSalePrice;
	}

	public void setProductSalePrice(BigDecimal productSalePrice) {
		this.productSalePrice = productSalePrice;
	}

	public BigDecimal getCostPrice() {
		return costPrice;
	}

	public void setCostPrice(BigDecimal costPrice) {
		this.costPrice = costPrice;
	}

	public String getAdminProductName() {
		return adminProductName;
	}

	public void setAdminProductName(String adminProductName) {
		this.adminProductName = adminProductName;
	}

	public String getCreateTimeStr() {
		if (createTime != null) {
			return DateConvertUtils.formatDateTime(createTime);
		}
		return null;
	}

	public Date getCreateTime() {
		return createTime;
	}

	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}

	public Long getProductId() {
		return productId;
	}

	public void setProductId(Long productId) {
		this.productId = productId;
	}

	public String getProductName() {
		return productName;
	}

	public void setProductName(String productName) {
		this.productName = productName;
	}

	public String getProductImg() {
		return productImg;
	}

	public void setProductImg(String productImg) {
		this.productImg = productImg;
	}

	public String getCategoryName() {
		return categoryName;
	}

	public void setCategoryName(String categoryName) {
		this.categoryName = categoryName;
	}

	public String getGroupName() {
		return groupName;
	}

	public void setGroupName(String groupName) {
		this.groupName = groupName;
	}

	public String getSaleStatusStr() {
		if (saleStatus != null) {
			return saleStatus.getTitle();
		}
		return null;
	}

	public ProductStatus getSaleStatus() {
		return saleStatus;
	}

	public void setSaleStatus(ProductStatus saleStatus) {
		this.saleStatus = saleStatus;
	}

	public String getSize() {
		return size;
	}

	public String getSizeName() {
		return size;
	}

	public void setSize(String size) {
		this.size = size;
	}

	public String getShortName() {
		return shortName;
	}

	public void setShortName(String shortName) {
		this.shortName = shortName;
	}
	
	public String getSaleStatusDesc() {
		return saleStatus.getTitle();
	}

	public String getIsSyncDesc() {
		return isSync.equals(true)?"同步":"不同步";
	}

	public SendType getSendType() {
		return sendType;
	}

	public void setSendType(SendType sendType) {
		this.sendType = sendType;
	}

	public String getSendTypeDesc() {
		return sendType == null ? null : sendType.getTitle();
	}
	

	public String getSalesPlatform() {
		return salesPlatform;
	}

	public void setSalesPlatform(String salesPlatform) {
		this.salesPlatform = salesPlatform;
	}

	@Override
	public String toString() {
		return "StockModel [productId=" + productId + ", productName=" + productName + ", adminProductName=" + adminProductName + ", productImg=" + productImg
				+ ", categoryName=" + categoryName + ", groupName=" + groupName + ", saleStatus=" + saleStatus + ", size=" + size + ", costPrice=" + costPrice
				+ ", productSalePrice=" + productSalePrice + ", createTime=" + createTime + ", isSync=" + isSync + ", sendType=" + sendType + "]";
	}

	

}
